package com.example.store;

import com.example.service.Tenant;

import javax.cache.configuration.Factory;

/**
 * 自定义Factory
 * 不使用CacheJdbcPojoStoreFactory时，可以自定义Factory
 */
public class DeviceCacheStoreFactory implements Factory<DeviceCacheStore> {

    private Tenant tenant;

    public DeviceCacheStoreFactory(Tenant tenant){
        this.tenant = tenant;
    }

    @Override
    public DeviceCacheStore create() {
        return new DeviceCacheStore(tenant);
    }
}
